<template>
    <div id="header">
        <router-link to="/">
            <img :src="'./logo.png'" alt="">
        </router-link>
        <div class="DocSwitch" @click="value5 = true">Api 文档</div>
        <Drawer :width="(DrawerSwitch ? 1200 : 300)" @on-close="closeDrawer" :closable="false" v-model="value5">
            <Apis v-model="DrawerSwitch"></Apis>
        </Drawer>
    </div>
</template>

<script>
import Apis from '../../views/api/index.vue'

export default {
    components: {
        Apis,
    },
    data() {
        return {
            DrawerSwitch: false,
            value5: false,
        }
    },
    methods: {
        closeDrawer() {
            this.DrawerSwitch = false;
        }
    }
}
</script>

<style>

.ApiDocument {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    overflow: hidden;
}

.ApiDocument-menu {
    position: absolute;
    width: 300px;
    height: 100%;
    right: 0;
    padding: 20px;
    overflow: auto;
}

.ApiDocument::before {
    display: block;
    content: "";
    position: absolute;
    top: 70px;
    bottom: 70px;
    right: 302px;
    border-left: 1px solid #ccc;
}

.ApiDocument-content {
    position: absolute;
    right: 300px;
    width: 900px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    top: 0;
    bottom: 0;
}


</style>